#include <stdio.h>
#include <ctype.h>
#include <stdbool.h>

int main() {
    int count = 0;
    int sum = 0;
    bool start_new_word = false;
    char c;
    while ((c = getchar()) != EOF) {
        if (ispunct(c) || isspace(c)) {
            if(start_new_word){
                count++;
            }
            start_new_word = false;
        } else{
            start_new_word = true;
            sum++;
        }
    }
    printf("有%d个单词，平均每个单词%d个字母", count, sum / count);
    return 0;
}


